import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm'
import * as puppeteer from "puppeteer"

@Entity({name: "account"})
export class AccountEntity {
  @PrimaryGeneratedColumn()
  id: number

  @Column('varchar', {length: 255, nullable: true})
  name: string

  @Column('int', {default: 1})
  type: number

  @Column('int', {nullable: true})
  uid: number
  
  @Column('text', {nullable: true})
  cookie: string

  @Column('text', {nullable: true})
  platform_user: string

  @Column('int', {nullable: true})
  hook_user_action: number


  @Column('int', {default: 0, comment: `0: "未绑定", 1: "已绑定", 2: "绑定过期"`})
  status: number

  @CreateDateColumn({type: 'datetime'})
  createAt: Date

  @UpdateDateColumn({type: 'datetime'})
  updateAt: Date
}